package cn.iocoder.yudao.module.forward.mqtt;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MqttInfo {
    @NotEmpty(message = "IP不能为空")
    private String ip;
    @NotEmpty(message = "端口号不能为空")
    private Integer port;
    @NotEmpty(message = "客户端ID不能为空")
    private String clientId;
    private String username;
    private String pwd;
    private Map<String, Object> topics = new ConcurrentHashMap<>();
    private Integer timeout;
    private Integer keepAliveInterval;
    @NotEmpty(message = "名称不能为空")
    private String name;
    private Charset charset;
    private Integer id;
}
